PHP code profiling

So I've just discovered the xdebug module for PHP. It's fucking sweet. I've barley played with the actual debugger at all yet, but I must say I'm extremely impressed by the code profiling modes. It allows several modes of output to track down slow and hot areas of code.

One can start in mode 4 to see total exection times for functions, then move to mode 6 to follow execution paths for problem functions that were determined to be slow:

Function Summary Profile (sorted by total execution time)
Total Time Taken Avg. Time Taken Number of Calls Function Name
0.2226700783 0.2226700783 1 *ViewSongBlock->fillContext
0.1100060940 0.1100060940 1 {require_once}
0.0959060192 0.0106562244 9 *BasePeer::doSelect
0.0848278999 0.0848278999 1 *CachableBlock->fillContext
0.0846049786 0.0846049786 1 *AccountInfoBlock->fillContext
0.0789210796 0.0789210796 1 *BaseSong->getAlbumSongsJoinAlbum
0.0758068562 0.0758068562 1 {require_once}
0.0700411797 0.0009727942 72 *TemplateApplicatorBlock->applyTemplate
0.0693910122 0.0693910122 1 *BaseSong->getSongCommentsJoinComment


Stack-Dump Profile (sorted by line numbers)
Time Taken Number of Calls Function Name Location
-> 0.2244310379 1 *ViewSongBlock->fillContext /usr/home/mint/public_html/server1/view-controller.php:335
-> 0.0122299194 1 *BaseSongPeer::retrieveByPK /usr/home/mint/public_html/server1/blocks/ViewSongBlock.class.php:27
-> 0.0000281334 1 *Propel::getConnection /usr/home/mint/public_html/server1/propel/build/classes/mint/om/BaseSongPeer.php:457
-> 0.0000720024 1 *Criteria->__construct /usr/home/mint/public_html/server1/propel/build/classes/mint/om/BaseSongPeer.php:460
-> 0.0000178814 1 *Criteria->setDbName /usr/home/mint/pear/lib/propel/util/Criteria.php:160
-> 0.0001721382 1 *Criteria->add /usr/home/mint/public_html/server1/propel/build/classes/mint/om/BaseSongPeer.php:461
-> 0.0000669956 1 *Criterion->__construct /usr/home/mint/pear/lib/propel/util/Criteria.php:557
-> 0.0000119209 1 explode /usr/home/mint/pear/lib/propel/util/Criteria.php:1187
-> 0.0116310120 1 *BaseSongPeer::doSelect /usr/home/mint/public_html/server1/propel/build/classes/mint/om/BaseSongPeer.php:463